// 将第一行导入语句修改为
import request from '@/request/request'

// 创建采购入库单
export function createPurchaseInbound(inbound) {
    return request({
        method: "post",
        url: '/purchase/inbound',
        data: inbound
    })
}

// 分页查询采购入库单
export function getPurchaseInboundPage(pageParams) {
    return request({
        method: "post",
        url: '/purchase/inbound/page',
        data: pageParams
    })
}



// 查询仓库
export function getWarehouse() {
    return request({
        method: "get",
        url: "/purchase/warehouse",
    })
}



// 获取采购入库单详情
export function getPurchaseInboundWithDetails(id) {
    return request({
        method: "get",
        url: `/purchase/inbound/withDetails/${id}`,
    })
}

// 更新采购入库单
export function updatePurchaseInbound(inbound) {
    return request({
        method: "put",
        url: '/purchase/inbound',
        data: inbound
    })
}

// 删除采购入库单
export function deletePurchaseInbound(id) {
    return request({
        method: "delete",
        url: `/purchase/inbound/${id}`,
    })
}
